<?php
require_once 'lib/validation/RegEx.php';
/**
 * Description of Hostname
 *
 * @author      Maciej Zawieja.
 * @link        http://akvus.pl
 * @package     Akvus Framework.
 * @subpackage  Libraries.
 * @copyright   2011 All rights reserved for Maciej Zawieja.
 * @version     1.0.0 - 19.08.2011 (Framework 1.3)
 */
class Hostname extends RegEx implements iValidation {

    const PARAMS_QUANTITY = 0;

    function   __construct() {
        $this->Pattern( "^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|\b-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|\b-){0,61}[0-9A-Za-z])?)*\.?$" );
    }
}